Integrand size = 23, antiderivative size = 181 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {b^2 \left (48 a^2+80 a b+35 b^2\right ) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{8 a^{9/2} (a+b)^{5/2} f}+\frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {b^4 \sin (e+f x)}{4 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )^2}-\frac {b^3 (16 a+13 b) \sin (e+f x)}{8 a^4 (a+b)^2 f \left (a+b-a \sin ^2(e+f x)\right )} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4232, 398, 1171, 393, 214} \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {b^4 \sin (e+f x)}{4 a^4 f (a+b) \left (-a \sin ^2(e+f x)+a+b\right )^2}-\frac {b^3 (16 a+13 b) \sin (e+f x)}{8 a^4 f (a+b)^2 \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {b^2 \left (48 a^2+80 a b+35 b^2\right ) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{8 a^{9/2} f (a+b)^{5/2}} \]
[In]
[Out]
Rule 214
Rule 393
Rule 398
Rule 1171
Rule 4232
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^4}{\left (a+b-a x^2\right )^3} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left (\frac {a-3 b}{a^4}-\frac {x^2}{a^3}+\frac {b^2 \left (6 a^2+8 a b+3 b^2\right )-4 a b^2 (3 a+2 b) x^2+6 a^2 b^2 x^4}{a^4 \left (a+b-a x^2\right )^3}\right ) \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {\text {Subst}\left (\int \frac {b^2 \left (6 a^2+8 a b+3 b^2\right )-4 a b^2 (3 a+2 b) x^2+6 a^2 b^2 x^4}{\left (a+b-a x^2\right )^3} \, dx,x,\sin (e+f x)\right )}{a^4 f} \\ & = \frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {b^4 \sin (e+f x)}{4 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )^2}-\frac {\text {Subst}\left (\int \frac {-b^2 \left (24 a^2+32 a b+11 b^2\right )+24 a b^2 (a+b) x^2}{\left (a+b-a x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{4 a^4 (a+b) f} \\ & = \frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {b^4 \sin (e+f x)}{4 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )^2}-\frac {b^3 (16 a+13 b) \sin (e+f x)}{8 a^4 (a+b)^2 f \left (a+b-a \sin ^2(e+f x)\right )}+\frac {\left (b^2 \left (48 a^2+80 a b+35 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{8 a^4 (a+b)^2 f} \\ & = \frac {b^2 \left (48 a^2+80 a b+35 b^2\right ) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{8 a^{9/2} (a+b)^{5/2} f}+\frac {(a-3 b) \sin (e+f x)}{a^4 f}-\frac {\sin ^3(e+f x)}{3 a^3 f}+\frac {b^4 \sin (e+f x)}{4 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )^2}-\frac {b^3 (16 a+13 b) \sin (e+f x)}{8 a^4 (a+b)^2 f \left (a+b-a \sin ^2(e+f x)\right )} \\ \end{align*}
Time = 3.25 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.07 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {-\frac {3 b^2 \left (48 a^2+80 a b+35 b^2\right ) \left (\log \left (\sqrt {a+b}-\sqrt {a} \sin (e+f x)\right )-\log \left (\sqrt {a+b}+\sqrt {a} \sin (e+f x)\right )\right )}{(a+b)^{5/2}}+12 \sqrt {a} \left (-12 b-\frac {b^4 (9 a+22 b+13 a \cos (2 (e+f x)))}{(a+b)^2 (a+2 b+a \cos (2 (e+f x)))^2}+a \left (3-\frac {16 b^3}{(a+b)^2 (a+2 b+a \cos (2 (e+f x)))}\right )\right ) \sin (e+f x)+4 a^{3/2} \sin (3 (e+f x))}{48 a^{9/2} f} \]
[In]
[Out]
Time = 5.84 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.98
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {a \sin \left (f x +e \right )^{3}}{3}-\sin \left (f x +e \right ) a +3 \sin \left (f x +e \right ) b}{a^{4}}-\frac {b^{2} \left (\frac {-\frac {a b \left (16 a +13 b \right ) \sin \left (f x +e \right )^{3}}{8 \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (16 a +11 b \right ) b \sin \left (f x +e \right )}{8 a +8 b}}{\left (a \sin \left (f x +e \right )^{2}-a -b \right )^{2}}-\frac {\left (48 a^{2}+80 a b +35 b^{2}\right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a \left (a +b \right )}}\right )}{a^{4}}}{f}\) | \(177\) |
default | \(\frac {-\frac {\frac {a \sin \left (f x +e \right )^{3}}{3}-\sin \left (f x +e \right ) a +3 \sin \left (f x +e \right ) b}{a^{4}}-\frac {b^{2} \left (\frac {-\frac {a b \left (16 a +13 b \right ) \sin \left (f x +e \right )^{3}}{8 \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (16 a +11 b \right ) b \sin \left (f x +e \right )}{8 a +8 b}}{\left (a \sin \left (f x +e \right )^{2}-a -b \right )^{2}}-\frac {\left (48 a^{2}+80 a b +35 b^{2}\right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a \left (a +b \right )}}\right )}{a^{4}}}{f}\) | \(177\) |
risch | \(-\frac {i {\mathrm e}^{3 i \left (f x +e \right )}}{24 a^{3} f}-\frac {3 i {\mathrm e}^{i \left (f x +e \right )}}{8 a^{3} f}+\frac {3 i {\mathrm e}^{i \left (f x +e \right )} b}{2 a^{4} f}+\frac {3 i {\mathrm e}^{-i \left (f x +e \right )}}{8 a^{3} f}-\frac {3 i {\mathrm e}^{-i \left (f x +e \right )} b}{2 a^{4} f}+\frac {i {\mathrm e}^{-3 i \left (f x +e \right )}}{24 a^{3} f}+\frac {i b^{3} \left (16 a^{2} {\mathrm e}^{7 i \left (f x +e \right )}+13 a b \,{\mathrm e}^{7 i \left (f x +e \right )}+16 a^{2} {\mathrm e}^{5 i \left (f x +e \right )}+69 a b \,{\mathrm e}^{5 i \left (f x +e \right )}+44 b^{2} {\mathrm e}^{5 i \left (f x +e \right )}-16 a^{2} {\mathrm e}^{3 i \left (f x +e \right )}-69 a b \,{\mathrm e}^{3 i \left (f x +e \right )}-44 b^{2} {\mathrm e}^{3 i \left (f x +e \right )}-16 a^{2} {\mathrm e}^{i \left (f x +e \right )}-13 a b \,{\mathrm e}^{i \left (f x +e \right )}\right )}{4 a^{4} \left (a +b \right )^{2} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b^{2}}{\sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{2}}+\frac {5 b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{\sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{3}}+\frac {35 b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{16 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{4}}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b^{2}}{\sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{2}}-\frac {5 b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{\sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{3}}-\frac {35 b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{16 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{4}}\) | \(671\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 416 vs. \(2 (171) = 342\).
Time = 0.32 (sec) , antiderivative size = 856, normalized size of antiderivative = 4.73 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\left [\frac {3 \, {\left (48 \, a^{2} b^{4} + 80 \, a b^{5} + 35 \, b^{6} + {\left (48 \, a^{4} b^{2} + 80 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (48 \, a^{3} b^{3} + 80 \, a^{2} b^{4} + 35 \, a b^{5}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a^{2} + a b} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, {\left (16 \, a^{5} b^{2} - 24 \, a^{4} b^{3} - 210 \, a^{3} b^{4} - 275 \, a^{2} b^{5} - 105 \, a b^{6} + 8 \, {\left (a^{7} + 3 \, a^{6} b + 3 \, a^{5} b^{2} + a^{4} b^{3}\right )} \cos \left (f x + e\right )^{6} + 8 \, {\left (2 \, a^{7} - a^{6} b - 15 \, a^{5} b^{2} - 19 \, a^{4} b^{3} - 7 \, a^{3} b^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (32 \, a^{6} b - 40 \, a^{5} b^{2} - 360 \, a^{4} b^{3} - 463 \, a^{3} b^{4} - 175 \, a^{2} b^{5}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{48 \, {\left ({\left (a^{10} + 3 \, a^{9} b + 3 \, a^{8} b^{2} + a^{7} b^{3}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{9} b + 3 \, a^{8} b^{2} + 3 \, a^{7} b^{3} + a^{6} b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{8} b^{2} + 3 \, a^{7} b^{3} + 3 \, a^{6} b^{4} + a^{5} b^{5}\right )} f\right )}}, -\frac {3 \, {\left (48 \, a^{2} b^{4} + 80 \, a b^{5} + 35 \, b^{6} + {\left (48 \, a^{4} b^{2} + 80 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (48 \, a^{3} b^{3} + 80 \, a^{2} b^{4} + 35 \, a b^{5}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a^{2} - a b} \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right ) - {\left (16 \, a^{5} b^{2} - 24 \, a^{4} b^{3} - 210 \, a^{3} b^{4} - 275 \, a^{2} b^{5} - 105 \, a b^{6} + 8 \, {\left (a^{7} + 3 \, a^{6} b + 3 \, a^{5} b^{2} + a^{4} b^{3}\right )} \cos \left (f x + e\right )^{6} + 8 \, {\left (2 \, a^{7} - a^{6} b - 15 \, a^{5} b^{2} - 19 \, a^{4} b^{3} - 7 \, a^{3} b^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (32 \, a^{6} b - 40 \, a^{5} b^{2} - 360 \, a^{4} b^{3} - 463 \, a^{3} b^{4} - 175 \, a^{2} b^{5}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{24 \, {\left ({\left (a^{10} + 3 \, a^{9} b + 3 \, a^{8} b^{2} + a^{7} b^{3}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{9} b + 3 \, a^{8} b^{2} + 3 \, a^{7} b^{3} + a^{6} b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{8} b^{2} + 3 \, a^{7} b^{3} + 3 \, a^{6} b^{4} + a^{5} b^{5}\right )} f\right )}}\right ] \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.50 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {3 \, {\left (48 \, a^{2} b^{2} + 80 \, a b^{3} + 35 \, b^{4}\right )} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {6 \, {\left ({\left (16 \, a^{2} b^{3} + 13 \, a b^{4}\right )} \sin \left (f x + e\right )^{3} - {\left (16 \, a^{2} b^{3} + 27 \, a b^{4} + 11 \, b^{5}\right )} \sin \left (f x + e\right )\right )}}{a^{8} + 4 \, a^{7} b + 6 \, a^{6} b^{2} + 4 \, a^{5} b^{3} + a^{4} b^{4} + {\left (a^{8} + 2 \, a^{7} b + a^{6} b^{2}\right )} \sin \left (f x + e\right )^{4} - 2 \, {\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3}\right )} \sin \left (f x + e\right )^{2}} + \frac {16 \, {\left (a \sin \left (f x + e\right )^{3} - 3 \, {\left (a - 3 \, b\right )} \sin \left (f x + e\right )\right )}}{a^{4}}}{48 \, f} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.27 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {3 \, {\left (48 \, a^{2} b^{2} + 80 \, a b^{3} + 35 \, b^{4}\right )} \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \sqrt {-a^{2} - a b}} - \frac {3 \, {\left (16 \, a^{2} b^{3} \sin \left (f x + e\right )^{3} + 13 \, a b^{4} \sin \left (f x + e\right )^{3} - 16 \, a^{2} b^{3} \sin \left (f x + e\right ) - 27 \, a b^{4} \sin \left (f x + e\right ) - 11 \, b^{5} \sin \left (f x + e\right )\right )}}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} {\left (a \sin \left (f x + e\right )^{2} - a - b\right )}^{2}} + \frac {8 \, {\left (a^{6} \sin \left (f x + e\right )^{3} - 3 \, a^{6} \sin \left (f x + e\right ) + 9 \, a^{5} b \sin \left (f x + e\right )\right )}}{a^{9}}}{24 \, f} \]
[In]
[Out]
Time = 0.35 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.41 \[ \int \frac {\cos ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {b^2\,\ln \left (\sqrt {a+b}+\sqrt {a}\,\sin \left (e+f\,x\right )\right )\,\left (3\,a^2+5\,a\,b+\frac {35\,b^2}{16}\right )}{a^{9/2}\,f\,{\left (a+b\right )}^{5/2}}-\frac {\frac {\sin \left (e+f\,x\right )\,\left (11\,b^4+16\,a\,b^3\right )}{8\,\left (a+b\right )}-\frac {{\sin \left (e+f\,x\right )}^3\,\left (16\,a^2\,b^3+13\,a\,b^4\right )}{8\,{\left (a+b\right )}^2}}{f\,\left (2\,a^5\,b-{\sin \left (e+f\,x\right )}^2\,\left (2\,a^6+2\,b\,a^5\right )+a^6+a^4\,b^2+a^6\,{\sin \left (e+f\,x\right )}^4\right )}-\frac {{\sin \left (e+f\,x\right )}^3}{3\,a^3\,f}-\frac {b^2\,\ln \left (\sqrt {a}\,\sin \left (e+f\,x\right )-\sqrt {a+b}\right )\,\left (48\,a^2+80\,a\,b+35\,b^2\right )}{16\,a^{9/2}\,f\,{\left (a+b\right )}^{5/2}}-\frac {\sin \left (e+f\,x\right )\,\left (\frac {3\,\left (a+b\right )}{a^4}-\frac {4}{a^3}\right )}{f} \]
[In]
[Out]